package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户评论信息对象 comments
 * 
 * @author ruoyi
 * @date 2025-03-08
 */
public class Comments extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 评论唯一ID（主键） */
    private Long commentId;

    /** 关联的帖子ID（外键） */
    @Excel(name = "关联的帖子ID", readConverterExp = "外=键")
    private Long postId;

    /** 评论用户ID（外键） */
    @Excel(name = "评论用户ID", readConverterExp = "外=键")
    private Long userId;

    /** 评论内容 */
    @Excel(name = "评论内容")
    private String context;

    /** 评论时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "评论时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date commentTime;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    /** 评论情感分析得分 */
    @Excel(name = "评论情感分析得分")
    private Long score;

    /** 回复的父评论ID（自关联） */
    @Excel(name = "回复的父评论ID", readConverterExp = "自=关联")
    private Long reply;

    private String userName;

    private String postName;

    public String getPostName() {
        return postName;
    }

    public void setPostName(String postName) {
        this.postName = postName;
    }

    public void setCommentId(Long commentId)
    {
        this.commentId = commentId;
    }

    public Long getCommentId() 
    {
        return commentId;
    }

    public void setPostId(Long postId) 
    {
        this.postId = postId;
    }

    public Long getPostId() 
    {
        return postId;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setContext(String context) 
    {
        this.context = context;
    }

    public String getContext() 
    {
        return context;
    }

    public void setCommentTime(Date commentTime) 
    {
        this.commentTime = commentTime;
    }

    public Date getCommentTime() 
    {
        return commentTime;
    }

    public void setScore(Long score) 
    {
        this.score = score;
    }

    public Long getScore() 
    {
        return score;
    }

    public void setReply(Long reply) 
    {
        this.reply = reply;
    }

    public Long getReply() 
    {
        return reply;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("commentId", getCommentId())
            .append("postId", getPostId())
            .append("userId", getUserId())
            .append("context", getContext())
            .append("commentTime", getCommentTime())
            .append("score", getScore())
            .append("reply", getReply())
            .toString();
    }
}
